package com.resume.common

data class Result<T>(
    val code: Int,
    val message: String,
    val data: T? = null
) {
    companion object {
        fun <T> success(data: T? = null): Result<T> {
            return Result(200, "操作成功", data)
        }
        
        fun <T> error(message: String): Result<T> {
            return Result(500, message, null)
        }
        
        fun <T> error(code: Int, message: String): Result<T> {
            return Result(code, message, null)
        }
    }
} 